Add some missing date_creation and date_mod columns#23884
Merged
cedric-anne merged 3 commits intoglpi-project:mainfrom Apr 29, 2026
Merged
Add some missing date_creation and date_mod columns#23884cedric-anne merged 3 commits intoglpi-project:mainfrom
cedric-anne merged 3 commits intoglpi-project:mainfrom
Conversation
cedric-anne
approved these changes
Apr 29, 2026
orthagh
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist before requesting a review
Description
Adds creation and mod dates to most main item tables that were missing them.
While useful for historical tracking, my main reason for this change is for consistency and open up more possibilities for caching.
Most "caching" done by GLPI is just memoization to reduce duplicated work within the same request, or caching some computed data between requests. Maybe in the future GLPI could cache more, and tracking these dates would make it easier to implement cache invalidation. Obviously if file-based caching is used it will probably not be much faster than just fetching results from the DB, nor would it be very efficient in terms of storage, but if Redis is used then it could be depending on where the DB is hosted and the type of data.
This could be more immediately useful in client-side applications in cases where a table scan would be done or many results would be fetched and reused in many places.
For example, A SPA frontend fetches the list of Domain Types using Apollo Client (id, name, date_mod) and caches it as it is assumed to not change often and be a relatively short list of options. Then when a user opens another of these dropdowns or needs to otherwise display/use extra information about them, even on another "page" as long as they don't refresh (unless it is persisted somewhere besides in memory), it is populated from the cached data instead of going back to the GLPI server and then the DB.
One solution is to use the Apollo client fetch policy to "cache-and-network" which would immediately use the data from the cache AND make the request to the GLPI server to update the cache (which could then trigger a component update), but this doesn't make sense in every case.
Another use case is differential updates. Instead of a Kanban view refreshing the entire view, refetching project and task details from the database, only the items changed since the last update could be fetched.
Another case is support for the If-Modified-Since/If-Unmodified-Since HTTP headers for REST endpoints.
Other PRs would be needed for: